Skip to content

Instantly share code, notes, and snippets.

@timonsku
timonsku / disable-folder-discovery.reg
Created March 4, 2024 01:07
Disable Windows folder disovery feature via Registry Key that forces every folder to be a misc folder
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\SOFTWARE\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags\AllFolders\Shell]
"FolderType"="NotSpecified"
@nelsonuhan
nelsonuhan / inland_mk47_qmk.md
Created October 7, 2023 03:23
Flashing QMK firmware onto the Inland MK-47

Flashing QMK firmware onto the Inland MK-47

2023.10.6

Keyboard

Done on a MacBook Pro (Apple Silicon). This worked for me, your mileage may vary.

Preliminaries

@AhsenBaig
AhsenBaig / WinSCP_WindowsTerminal.bat
Last active May 13, 2024 12:44
WinSCP - Replace PuTTY with Windows Terminal
@echo off
@REM WinSCP PuTTY/Terminal client path:
@REM "<drive>:\<Path_to_file>\WindowsTerminal.bat" "!K" !U@!@ !# !/ "!N"
@REM setlocal
setlocal enabledelayedexpansion
SET "debugMode=n"
SET "Line======================="
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active May 13, 2024 12:43
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
@3ventic
3ventic / IrcCommand.cs
Created November 4, 2019 19:49
Standalone C# message parser class for Twitch Messaging Interface (TMI)
using System.Collections.Generic;
using System.Text;
/*****************************************************************************
MIT License
Copyright (c) 2019 Werner Vänttinen
Permission is hereby granted, free of charge, to any person obtaining a copy
@stellasphere
stellasphere / descriptions.json
Last active May 13, 2024 12:39
WMO weather interpretation code descriptions (& images)
{
"0":{
"day":{
"description":"Sunny",
"image":"http://openweathermap.org/img/wn/01d@2x.png"
},
"night":{
"description":"Clear",
"image":"http://openweathermap.org/img/wn/01n@2x.png"
}

Mac OS X Traffic Lights

Useful in Electron apps when the default title bar must be hidden. There are some slight issues with this rendering in browser, but it looks perfect inside Electron :)

A Pen by atdrago on CodePen.

License.

@cferdinandi
cferdinandi / stop-video.js
Last active May 13, 2024 12:32
A simple method to stop YouTube, Vimeo, and HTML5 videos from playing.
/**
* Stop an iframe or HTML5 <video> from playing
* @param {Element} element The element that contains the video
*/
var stopVideo = function ( element ) {
var iframe = element.querySelector( 'iframe');
var video = element.querySelector( 'video' );
if ( iframe ) {
var iframeSrc = iframe.src;
iframe.src = iframeSrc;
@ricardo0100
ricardo0100 / PhotoView.swift
Created August 15, 2020 15:20
Photo View with zoom and edges control in SwiftUI
import SwiftUI
struct PhotoView: View {
@State var scale: CGFloat = 1
@State var scaleAnchor: UnitPoint = .center
@State var lastScale: CGFloat = 1
@State var offset: CGSize = .zero
@State var lastOffset: CGSize = .zero
@State var debug = ""